using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using WeifenLuo.WinFormsUI.Docking;

using PACKETPARSERMAX20.CORE;

namespace PACKETPARSERMAX20.WinUI
{
    public partial class frmHex : DockContent
    {
        public frmHex()
        {
            InitializeComponent();
            this.Width = 400;
        }

        public void Init()
        {
            StaticObjects.eventManager.EventLoadHex += new EventManager.DelegateLoadHex(LoadHex);
        }

 

        public void LoadHex(byte[] pData)
        {

            if (InvokeRequired)
            {
                EventManager.DelegateLoadHex tDelegate = new EventManager.DelegateLoadHex(LoadHex);
                this.Invoke(tDelegate, new object[] { pData });
            }
            else
            {
 
                Be.Windows.Forms.DynamicByteProvider tDynamicByteProvider = new Be.Windows.Forms.DynamicByteProvider(pData);
                hexBox1.ByteProvider = tDynamicByteProvider;
            }
        }


    }
}